package locations.actions;

import locations.dao.implement.PracticaDAOHibernateJPA;
import locations.model.Practica;

import com.opensymphony.xwork2.ActionSupport;
import locations.dao.implement.UserDAOHibernateJPA;
import locations.model.Usuario;

public class DeleteUserAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	private Long id;

	@Override
	public String execute() throws Exception {
		UserDAOHibernateJPA d = new UserDAOHibernateJPA();
		Usuario u = d.retrieveById(id);
		u.setValido(false);
		d.save(u);
		return SUCCESS;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


}